package SoftwarePrinciple.LiskovSubstitutionPrinciple;

/**
 * @author: Themberfue
 * @date: 2025/8/7 11:36
 * @description:
 */
// 实现形状接口的矩形
public class RectangleShape implements Shape {
    private int width;
    private int height;

    public RectangleShape(int width, int height) {
        this.width = width;
        this.height = height;
    }

    public void setWidth(int width) {
        this.width = width;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    @Override
    public int calculateArea() {
        return width * height;
    }
}

